# Contributor: Rob Blanckaert <basicer@gmail.com>
# Maintainer: Rob Blanckaert <basicer@gmail.com>
pkgname=dtrx
pkgver=8.5.3
pkgrel=0
pkgdesc="Do The Right eXtraction"
url="http://www.brettcsmith.org/2007/dtrx/"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-invoke"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/dtrx-py/dtrx/archive/refs/tags/$pkgver.tar.gz"
options="!check" # requires all decompression programs and makes network requests

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 tests/compare.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
11809e4961c149091eece5ee815cc5d85f7d746bfc632a63210d3d0b18975732b92c43d414aa5fcf37793ebc34a2b8a6c72bb243d8ab2813d470bad390ceedf4  dtrx-8.5.3.tar.gz
"
